﻿using T4UtilityBelt.DataDesigns;
using T4UtilityBelt.Writers;

namespace T4UtilityBelt.UxDesigns.Controls.Renderers.ViewModel
{
    public class ParentOneRenderer : ParentRenderer<ParentOneControl, IParentOneRenderer, ParentOne>, IParentOneRenderer
    {
        protected override void OnRenderUiXmlContentInput(ParentOneControl control, CodeWriter writer)
        {
        }

        protected override void OnRenderUiXmlContentReadOnly(ParentOneControl control, CodeWriter writer)
        {
        }

        protected override void OnRenderUiCode(ParentOneControl control, CodeWriter writer)
        {
            writer.WriteFormatLine(
@"      public {0}Collection {0}List
        {{
            get
            {{
                return {0}Pickers.Items().Result;
            }}
        }}
",
            control.Property.ToName
);
        }
    }
}